Integrand size = 25, antiderivative size = 247 \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=-\frac {\sqrt {2} a^2 \arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}+\frac {\sqrt {2} a^2 \arctan \left (1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}+\frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}-\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}} \]
[Out]
Time = 0.31 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3623, 12, 3555, 3557, 335, 303, 1176, 631, 210, 1179, 642} \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=-\frac {\sqrt {2} a^2 \arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}+\frac {\sqrt {2} a^2 \arctan \left (\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}+1\right )}{d e^{5/2}}+\frac {a^2 \log \left (\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}+\sqrt {e}\right )}{\sqrt {2} d e^{5/2}}-\frac {a^2 \log \left (\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}+\sqrt {e}\right )}{\sqrt {2} d e^{5/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}} \]
[In]
[Out]
Rule 12
Rule 210
Rule 303
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3555
Rule 3557
Rule 3623
Rubi steps \begin{align*} \text {integral}& = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {\int \frac {2 a^2 e}{(e \cot (c+d x))^{3/2}} \, dx}{e^2} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {\left (2 a^2\right ) \int \frac {1}{(e \cot (c+d x))^{3/2}} \, dx}{e} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}-\frac {\left (2 a^2\right ) \int \sqrt {e \cot (c+d x)} \, dx}{e^3} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {\sqrt {x}}{e^2+x^2} \, dx,x,e \cot (c+d x)\right )}{d e^2} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {\left (4 a^2\right ) \text {Subst}\left (\int \frac {x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{d e^2} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {e-x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{d e^2}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {e+x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{d e^2} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {a^2 \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}+2 x}{-e-\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}+\frac {a^2 \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}-2 x}{-e+\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}+\frac {a^2 \text {Subst}\left (\int \frac {1}{e-\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{d e^2}+\frac {a^2 \text {Subst}\left (\int \frac {1}{e+\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{d e^2} \\ & = \frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}-\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}+\frac {\left (\sqrt {2} a^2\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}-\frac {\left (\sqrt {2} a^2\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}} \\ & = -\frac {\sqrt {2} a^2 \arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}+\frac {\sqrt {2} a^2 \arctan \left (1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{d e^{5/2}}+\frac {2 a^2}{3 d e (e \cot (c+d x))^{3/2}}+\frac {4 a^2}{d e^2 \sqrt {e \cot (c+d x)}}+\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}}-\frac {a^2 \log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{\sqrt {2} d e^{5/2}} \\ \end{align*}
Time = 3.06 (sec) , antiderivative size = 400, normalized size of antiderivative = 1.62 \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=\frac {a^2 \left (48 \cos ^2(c+d x)+6 \sqrt {2} \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right ) \cot ^{\frac {5}{2}}(c+d x) \sin ^2(c+d x)-6 \sqrt {2} \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right ) \cot ^{\frac {5}{2}}(c+d x) \sin ^2(c+d x)+3 \sqrt {2} \cot ^{\frac {5}{2}}(c+d x) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right ) \sin ^2(c+d x)-3 \sqrt {2} \cot ^{\frac {5}{2}}(c+d x) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right ) \sin ^2(c+d x)+4 \sin (2 (c+d x))+6 \arctan \left (\sqrt [4]{-\cot ^2(c+d x)}\right ) \left (4 \sqrt [4]{-\cot (c+d x)} \cot ^{\frac {9}{4}}(c+d x) \sin ^2(c+d x)-\left (-\cot ^2(c+d x)\right )^{3/4} \sin (2 (c+d x))\right )-6 \text {arctanh}\left (\sqrt [4]{-\cot ^2(c+d x)}\right ) \left (4 \cos ^2(c+d x) \sqrt [4]{-\cot ^2(c+d x)}+\left (-\cot ^2(c+d x)\right )^{3/4} \sin (2 (c+d x))\right )\right ) (1+\tan (c+d x))^2}{12 d e^2 \sqrt {e \cot (c+d x)} (\cos (c+d x)+\sin (c+d x))^2} \]
[In]
[Out]
Time = 0.05 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.70
method | result | size |
derivativedivides | \(-\frac {2 a^{2} \left (-\frac {\sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 e \left (e^{2}\right )^{\frac {1}{4}}}-\frac {1}{3 \left (e \cot \left (d x +c \right )\right )^{\frac {3}{2}}}-\frac {2}{e \sqrt {e \cot \left (d x +c \right )}}\right )}{d e}\) | \(174\) |
default | \(-\frac {2 a^{2} \left (-\frac {\sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 e \left (e^{2}\right )^{\frac {1}{4}}}-\frac {1}{3 \left (e \cot \left (d x +c \right )\right )^{\frac {3}{2}}}-\frac {2}{e \sqrt {e \cot \left (d x +c \right )}}\right )}{d e}\) | \(174\) |
parts | \(-\frac {2 a^{2} e \left (-\frac {\left (e^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 e^{4}}-\frac {1}{3 e^{2} \left (e \cot \left (d x +c \right )\right )^{\frac {3}{2}}}\right )}{d}-\frac {a^{2} \left (e^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 d \,e^{3}}+\frac {2 a^{2} \left (\frac {\sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 e^{2} \left (e^{2}\right )^{\frac {1}{4}}}+\frac {2}{e^{2} \sqrt {e \cot \left (d x +c \right )}}\right )}{d}\) | \(459\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.29 (sec) , antiderivative size = 446, normalized size of antiderivative = 1.81 \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=\frac {3 \, {\left (d e^{3} \cos \left (2 \, d x + 2 \, c\right ) + d e^{3}\right )} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {1}{4}} \log \left (d^{3} e^{8} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {3}{4}} + a^{6} \sqrt {\frac {e \cos \left (2 \, d x + 2 \, c\right ) + e}{\sin \left (2 \, d x + 2 \, c\right )}}\right ) - 3 \, {\left (i \, d e^{3} \cos \left (2 \, d x + 2 \, c\right ) + i \, d e^{3}\right )} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {1}{4}} \log \left (i \, d^{3} e^{8} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {3}{4}} + a^{6} \sqrt {\frac {e \cos \left (2 \, d x + 2 \, c\right ) + e}{\sin \left (2 \, d x + 2 \, c\right )}}\right ) - 3 \, {\left (-i \, d e^{3} \cos \left (2 \, d x + 2 \, c\right ) - i \, d e^{3}\right )} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {1}{4}} \log \left (-i \, d^{3} e^{8} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {3}{4}} + a^{6} \sqrt {\frac {e \cos \left (2 \, d x + 2 \, c\right ) + e}{\sin \left (2 \, d x + 2 \, c\right )}}\right ) - 3 \, {\left (d e^{3} \cos \left (2 \, d x + 2 \, c\right ) + d e^{3}\right )} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {1}{4}} \log \left (-d^{3} e^{8} \left (-\frac {a^{8}}{d^{4} e^{10}}\right )^{\frac {3}{4}} + a^{6} \sqrt {\frac {e \cos \left (2 \, d x + 2 \, c\right ) + e}{\sin \left (2 \, d x + 2 \, c\right )}}\right ) - 2 \, {\left (a^{2} \cos \left (2 \, d x + 2 \, c\right ) - 6 \, a^{2} \sin \left (2 \, d x + 2 \, c\right ) - a^{2}\right )} \sqrt {\frac {e \cos \left (2 \, d x + 2 \, c\right ) + e}{\sin \left (2 \, d x + 2 \, c\right )}}}{3 \, {\left (d e^{3} \cos \left (2 \, d x + 2 \, c\right ) + d e^{3}\right )}} \]
[In]
[Out]
\[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=a^{2} \left (\int \frac {1}{\left (e \cot {\left (c + d x \right )}\right )^{\frac {5}{2}}}\, dx + \int \frac {2 \cot {\left (c + d x \right )}}{\left (e \cot {\left (c + d x \right )}\right )^{\frac {5}{2}}}\, dx + \int \frac {\cot ^{2}{\left (c + d x \right )}}{\left (e \cot {\left (c + d x \right )}\right )^{\frac {5}{2}}}\, dx\right ) \]
[In]
[Out]
Exception generated. \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
\[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=\int { \frac {{\left (a \cot \left (d x + c\right ) + a\right )}^{2}}{\left (e \cot \left (d x + c\right )\right )^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
Time = 13.09 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.40 \[ \int \frac {(a+a \cot (c+d x))^2}{(e \cot (c+d x))^{5/2}} \, dx=\frac {4\,a^2\,\mathrm {cot}\left (c+d\,x\right )+\frac {2\,a^2}{3}}{d\,e\,{\left (e\,\mathrm {cot}\left (c+d\,x\right )\right )}^{3/2}}+\frac {2\,{\left (-1\right )}^{1/4}\,a^2\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}}{\sqrt {e}}\right )}{d\,e^{5/2}}-\frac {2\,{\left (-1\right )}^{1/4}\,a^2\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}}{\sqrt {e}}\right )}{d\,e^{5/2}} \]
[In]
[Out]